package org.springblade.resource.feign;

import org.springblade.core.launch.constant.AppConstant;
import org.springblade.core.tool.api.R;
import org.springblade.resource.oss.BladeFileWithType;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(
	value = AppConstant.APPLICATION_RESOURCE_NAME,
	fallback = IOssClientFallback.class
)
public interface IOssClient {

	String API_PREFIX = "/client";
	String PUT_FILE = API_PREFIX + "/put-file";

	@PostMapping(value = PUT_FILE,consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
	 R<BladeFileWithType> putFile(@RequestPart MultipartFile file);
}
